/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package marifnst.jse71.using_operators_and_decision_constructs;

/**
 *
 * @author arifnasution
 */
public class SampleEquals
{

    public SampleEquals()
    {
    }

    public void equalsComparator( String string_1, String string_2 )
    {
        // .equals
        // Apple = Apple
        // Apple != apple
        if ( string_1.equals( string_2 ) )
        {
            System.out.println( "string_1 equals string_2" );
        } else
        {
            System.out.println( "string_1 not equals string_2" );
        }
    }

    public void equalsIgnoreCaseComparator( String string_1, String string_2 )
    {
        // .equalsIgnoreCase
        // Apple = Apple
        // Apple = apple
        if ( string_1.equalsIgnoreCase( string_2 ) )
        {
            System.out.println( "string_1 equals ignore case string_2" );
        } else
        {
            System.out.println( "string_1 not equals ignore case string_2" );
        }
    }
}
